home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10948 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  912 b 

  1. Path: montana.avicom.net!not-for-mail
  2. From: zoot@montana.avicom.net (John Greenup)
  3. Newsgroups: comp.lang.c
  4. Subject: problem w/ realloc
  5. Date: 20 Mar 1996 19:21:20 -0700
  6. Organization: Avicom
  7. Distribution: usa
  8. Message-ID: <4iqef0$dqq@montana.avicom.net>
  9. NNTP-Posting-Host: montana.avicom.net
  10.  
  11. I've been porting a piece of code from AIX 3.2.5 to linux 1.2.8
  12. (gcc 2.7.0) recently, and finaly chased down the last :-) bug.  The code 
  13. assumes that if you have a memory block, and you realloc it smaller, it 
  14. doesn't move the block of memory, it just makes the "usable size" of it 
  15. smaller. (in fact, my textbook ("advanced programming in the unix 
  16. environment" stevens) supports this usage) unfortunately, xxgdb has 
  17. revealed that the realloc is moving my pointer!  am I mistaken about the 
  18. standards, or is this a special case I'm not aware of?
  19. any help appreciated-
  20. john greenup
  21. Zoot Enterprises
  22. zoot@www.avicom.net
  23.  
  24.